13. Quiz: Subdags

SubDAGs

The diagram above shows two DAGs and their tasks. Which tasks could be placed into a SubDAG for reuse?

SOLUTION:
  • HTTP Data Fetch
  • Data Check

SubDAG Advantages

Which of the following are advantages of SubDAGs?

SOLUTION:
  • Reduces duplicated code in DAGs
  • Allows for simple reusability of commonly occurring task patterns

SubDAGs Disadvantages

Which of the following are drawbacks of SubDAGs?

SOLUTION:
  • Reduces visibility in the Airflow UI
  • Harder to understand and maintain if improperly scoped
  • Encourages Premature Optimization